package com.lvbaoins.Harmony.system.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lvbaoins.Harmony.system.mapper.InsCityMapper;
import com.lvbaoins.Harmony.system.domain.InsCity;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 城市 服务
 * </p>
 *
 * @author gjb
 * @Date 2020-08-14 15:12:09
 */
@Service
public class InsCityService extends ServiceImpl<InsCityMapper, InsCity> {


    /**
     * 分页查询
     *
     * @param pageIndex
     * @param limit
     * @param insCity
     * @return
     */
    public IPage<InsCity> pageList(Integer pageIndex, Integer limit, InsCity insCity) {
        Page page = new Page<InsCity>(pageIndex, limit);
        QueryWrapper<InsCity> queryWrapper = new QueryWrapper<>(insCity);
        queryWrapper.orderBy(true, true, "id");
        return this.page(page, queryWrapper);
    }
}
